/**
 * ======================================
 * 系统管理用户列表
 * author: SKY-D
 * file: user-class.js
 * date: 2022/6/15 22:44
 * ======================================
 */
import baseClass from '@/list/baseClass'
import _ from 'lodash'
export default class userClass extends baseClass {
  constructor(prop) {
    super(prop)
    this.id = _.get(prop, 'id', '')
    this.index = _.get(prop, 'id', '')
    this.account = _.get(prop, 'user_name', '')
    this.realName = _.get(prop, 'real_name', '')
    this.mobile = _.get(prop, 'mobile', '')
    this.idCard = _.get(prop, 'id_card', '')
    this.roleId = _.get(prop, 'role.id', '')
    this.roleName = _.get(prop, 'role.name', '')
    this.builds = _.get(prop, 'builds', '')
    this.disable = _.get(prop, 'is_disable', '')
  }
  list() {
    return [
      {
        name: '账号',
        key: 'account',
        fixed: '',
        edit: false,
        show: true,
        value: '100'
      },
      {
        name: '真实姓名',
        key: 'realName',
        fixed: '',
        edit: false,
        show: true,
        value: '100'
      },
      {
        name: '手机号码',
        key: 'mobile',
        fixed: '',
        edit: false,
        show: true,
        value: '100'
      },
      {
        name: '角色',
        key: 'roleName',
        fixed: '',
        edit: false,
        show: true,
        value: '90'
      },
      {
        name: '范围',
        key: 'builds',
        fixed: '',
        edit: false,
        show: true,
        value: ''
      },
      {
        name: '启用',
        key: 'disable',
        fixed: '',
        edit: false,
        show: true,
        value: 70
      },
      {
        name: '操作',
        key: 'action',
        fixed: 'right',
        edit: false,
        show: true,
        value: 220
      }
    ]
  }
}
